import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'
import Storage from './utils/storage-manage'
import Methods from './utils/Methods'
import './styles/index.scss'
import './components/componentRegister'
import '../preview/components/index.js'
import './directives.js';
import moment from 'moment';

if(process.env.NODE_ENV === 'development'){
    // require('../__mock/index.js')
}
Vue.config.productionTip = false
Vue.prototype.$Storage = Storage
Vue.prototype.$Methods = Methods
Vue.prototype.$formatDate = function(date, format = 'YYYY-MM-DD HH:mm:ss') {
  return moment(date).format(format);
};

import echarts from 'echarts'
Vue.prototype.$echarts = echarts

import VueDraggable from "vue-draggable";
Vue.use(VueDraggable);

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
